package whisper.api.gateway.frame.auth.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import whisper.api.gateway.frame.auth.domain.Role;
import whisper.api.gateway.frame.auth.repository.RoleRepository;

import java.util.List;

/**
 * Created by JT on 2017/9/22.
 */
@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleRepository roleRepository;

    @Override
    public List<Role> findRolesByUserId(Integer userId) {
        return roleRepository.findRolesByUid(userId);
    }
}
